package cn.changhong.user.model.vo;

import cn.changhong.user.model.Authentication;
import cn.changhong.user.model.Role;
import cn.changhong.user.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;

/**
 * @Author zz
 * @Date
 **/
public class RoleVO {
    @Autowired
    RoleService roleService;

    String roleName;
    String status;
    int roleId;
    List<Authentication> authorities;

    public RoleVO(Role role, List<Authentication> authorities) {
        this.roleName = role.getName();
        this.status=role.getStatus()==1?"启用":"冻结";
        this.roleId=role.getId();
        this.authorities=authorities;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    public List<Authentication> getAuthorities() {
        return authorities;
    }

    public void setAuthorities(List<Authentication> authorities) {
        this.authorities = authorities;
    }
}
